package com.ibm.commerce.url.tooling;

import com.ibm.commerce.url.tasks.cmc.*;
import com.ibm.commerce.url.exception.*;
import com.ibm.wc.test.exception.DatablockMissingException;

public class CMC extends URLTooling {
//	private static CMC instance = new CMC();
	
	private CMC(){}
	
//	public static CMC getInstance(){
//		return instance;
//	}
	
	public static void logon(String logonName, String passWord) throws TaskFailException, NullPointerException, DatablockMissingException {
		if(logonName==null || passWord==null){
			throw new NullPointerException("logonName or passWord is null!");
		}
		
		browserContext.addInputParam(CMCLogon.INPUT_PARAMETER_NAME_LOGONID, logonName);
		browserContext.addInputParam(CMCLogon.INPUT_PARAMETER_NAME_LOGONPASSWORD, passWord);
		CMCLogon.execute();
	}
	
}
